<html>
<head>
    <meta charset="utf-8">
    <title>首页</title>
    <#assign base=request.contextPath  />
    <#setting  number_format="0.##"/>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="${base}/frame/layuiadmin/layui/css/layui.css" media="all">
<#--    <link rel="stylesheet" href="${base}/sweep/css/app.css" media="all">-->
    <link rel="stylesheet" href="${base}/sweep/css/mui.min.css" media="all">
    <link rel="stylesheet" type="text/css" href="${base}/sweep/css/style.css" />
    <link rel="stylesheet" href="${base}/sweep/lunbo/css/style.css" />
    <link rel="stylesheet" type="text/css" href="${base}/sweep/css/style.css"/>
    <link rel="stylesheet" type="text/css" href="${base}/sweep/icon/iconfont.css"/>
    <script src="${base}/backstage/js/jquery-1.8.3.min.js"></script>
    <script src="${base}/backstage/layui/layui.js"></script>

    <script src="${base}/sweep/js/mui.min.js"></script>
    <script src="${base}/sweep/js/cehua.js"></script>
    <script src="${base}/sweep/icon/iconfont.js"></script>
    <style type="text/css">
        #userImage{
            width: 52px;
            position: relative;
            top: 22px;
            left: 10px;
        }
        #username{
            position: relative;
            left: 18px;
            bottom: 3px;
            font-size: 13px;
            font-family: cursive;
        }
        #id{
            position: relative;
            left: 74px;
            bottom: 25px;
            font-size: 10px;
            color: yellow;
            font-family: cursive;
        }
        .mui-col-xs-4 img {
            width: 32px;
            height: 32px;
        }
        .money{
            position: absolute;
            top: 9%;
            left: 24%;
            color: white;
            font-weight: 900;
            font-size: 14px;
        }
        .mui-table-view-cell a{
            font-size: 15px;
        }

       .c-banner .banner ul li img{
            position: fixed;
            top:0;
        }
        .div{
            overflow: hidden;
            height: 118px;
        }
        .box{
            background: #eee;
            padding: 10px 0;
            white-space: nowrap;/*文本不会换行，文本会在在同一行下继续*/
            /*overflow-y:auto;!*可滑动*!*/
        }
        /*自定义滚动条的伪对象选择器, CSS 可以隐藏滚动条*/
        .box::-webkit-scrollbar{
            display: none;
        }
        .box1{
            /*margin-left: 3%;*/
            height: 112px;
            background: #fff;
            display: inline-block;/*行内块元素*/
            position: relative;
            bottom: 21px;
            width: 50%;
        }
        .box1 p{
            position: relative;left:15px;top: 16px;
        }
        .box1 span{
            position: relative;bottom: 15px;left: 21px;font-size: 14px;color: red;
        }
        .box1 button{
            width: 41%;height: 21%;position: relative;right: 29%;top:8px;background-color: hotpink;
        }
        .box1 img{
            width: 88px;height: 82px;position: relative;bottom: 10px;right: 51px;
        }

        #controls{
            display: none;
        }

    </style>
</head>
<body>
<#--<input type="hidden" value="${user.tel}" id="tel" />-->
<div class="mui-content" >
<div style="height: 100px;background-color: #404040">
<#--    <div id="controls"></div>-->
    <div id="controls"  style="height: 100px;width: 312px;margin:0 auto;position: relative;top:50px;background-color: #8f8f94" onclick="window.location.href='${base}/wx/user/personal.html'">
        <div class="pertop" >
            <img src="${user.imge}" id="userImage">
            <span class="sapna" id="username">昵称: ${user.nickName}</span>
        </div>
        <div class="pertop">
            <span class="sapna" id="id">邀请码: ${user.discountCode}</span><br>
            <span class="sapna" id="id" style="color: #FFFFFF">余额: ${user.moeny}</span>&nbsp;&nbsp;&nbsp;&nbsp;
            <span class="sapna" id="id" style="color: #FFFFFF">积分: 0</span>
        </div>
    </div>
</div>
            <!--轮播图-->
            <div class="c-banner">
                <div class="banner">
                    <ul>
                        <#list wheelPlanting as wheelPlanting>
                            <li><img src="${wheelPlanting.url}" style="height: 200px;"></li>
                        </#list>
                    </ul>
                </div>
            </div>
            <!--图标-->
            <div id="icon" style="position: relative;bottom: 55px">
                <div class="mui-slider-group">
                    <div class="mui-slider-item">
                        <div class="demotwo">
                            <#list list as list>
                                <div class="mui-col-xs-3 mui-col-sm-3" onclick="window.location.href='${base}/wx/good/goodList.html?id=${list.id}'">
                                    <i class="iconfont icon-${list.icon}"></i>
                                    <h5 style="padding-top: 6px;">${list.name}</h5>
                                </div>
                            </#list>


                            <div class="mui-col-xs-3 mui-col-sm-3" onclick="window.location.href='${base}/wx/user/more.html'">
                                <i class="iconfont icon-gengduo"></i>
                                <h5 style="padding-top: 6px;">更多类目</h5>
                            </div>
                        </div>

                    </div>
                </div>
            </div>
            <!--每日必推-->
            <div class="div" style="border: 1px solid #eee;position: relative;bottom:47px;">
                <div class="box">
                        <div class="box1" onclick="goodDetails('${quality.id}')">
                            <p>必推好货</p>
                            <span>￥${quality.goodPrice}</span>
                            <button type="button" class="layui-btn layui-btn-danger layui-btn-radius">赚:${quality.saleProfit}</button>
                            <img src="${image}" >
                        </div>
<#--                    <div class="box1" onclick="goodDetails('123')">-->
<#--                        <p>必推好货</p>-->
<#--                        <span>￥30.00</span>-->
<#--                        <button type="button" class="layui-btn layui-btn-danger layui-btn-radius">赚:20.00</button>-->
<#--                        <img src="${base}/sweep/lunbo/img/风衣2.jpg" >-->
<#--                    </div>-->
                    <div class="box1" onclick="goodDetails('${point.id}')">
                        <p>冰点秒杀</p>
                        <span>￥${point.goodPrice}</span>
                        <button type="button" class="layui-btn layui-btn-danger layui-btn-radius">赚:${point.saleProfit}</button>
                        <img src="${url}">
                    </div>
<#--                    <div class="box1" onclick="goodDetails('123')">-->
<#--                        <p>必推好货</p>-->
<#--                        <span>￥30.00</span>-->
<#--                        <button type="button" class="layui-btn layui-btn-danger layui-btn-radius">赚:20.00</button>-->
<#--                        <img src="${base}/sweep/lunbo/img/风衣2.jpg" >-->
<#--                    </div>-->

                </div>
            </div>
        </div>

<!--每日推荐-->
<div style="text-align: center;background-color: lightgray;height: 43px;position: relative;bottom:44px;">
    <span style="color: #df5000">---</span> <span style="color: #ffffff">每&nbsp;&nbsp;日&nbsp;&nbsp;推&nbsp;&nbsp;荐</span> <span style="color: #df5000">----</span><br>
    <span style="text-align: center;color: #df5000;font-size: 11px">疯狂抢购</span>&nbsp;&nbsp;&nbsp;<span style="text-align: center;color: #df5000;font-size: 11px">质量保证</span>
</div>
    <ul class="mui-table-view" id="ul" style="position: relative;bottom: 32px;">
<#--        <li class="mui-table-view-cell mui-media">-->
<#--            <a href="javascript:;">-->
<#--                <img class="mui-media-object mui-pull-left" src="${base}/sweep/lunbo/img/风衣.jpg">-->
<#--                <div class="mui-media-body">-->
<#--                    实拍现货 秋装双排扣中长款过膝风衣外套女修身 9707-P120控168-->
<#--                    <p class='mui-ellipsis' style="position: relative;top:6px;"><span style="color: red;font-size: 17px;">￥120.00</span><span>/赚 ￥13.50</span></p>-->
<#--                    <button type="button" class="layui-btn layui-btn-danger layui-btn-radius" style="float: right;height: 32px;width: 96px;">分 享 赚</button>-->
<#--                </div>-->
<#--            </a>-->
<#--        </li>-->
    </ul>
</div>
</body>
<script src="${base}/sweep/lunbo/js/lun.js"></script>
<script>

    layui.use('layer', function() { //独立版的layer无需执行这一句
        var $ = layui.jquery,
            layer = layui.layer; //独立版的layer无需执行这一句

        //每次加载页面执行一次
        <#--layer.ready(function(){-->
        <#--    if(${tel}==0){-->
        <#--        layer.open({-->
        <#--            type: 2  //type等于2跳转页面-->
        <#--            ,content: '${base}/wx/user/phone.html'-->
        <#--            ,title: ''-->
        <#--            ,closeBtn:0 //不显示关闭的X-->
        <#--            ,anim: 1-->
        <#--            ,shadeClose:false-->
        <#--            ,area:['100%','200px']//宽高-->
        <#--            ,btnAlign: 'c' //按钮居中-->
        <#--            ,shade: 0.8 //不显示遮罩-->
        <#--        });-->
        <#--    }-->

        <#--});-->
    })


    $(document).ready(function() {
        setTimeout(function(){
            $("#controls").slideDown("slow");
        },800);
    });

    $(function () {
        $.ajax({
            type: "GET",
            url: "${base}/wx/good/selectGood",
            dataType: 'json',
            success: function (data) {
                if (data.code === 200) {
                    for (let i = 0; i < data.data.length; i++) {
                        $("#ul").append(
                        '<li class="mui-table-view-cell mui-media" onclick="goodDetails(\''+data.data[i].id+'\')">'+
                        '<a href="javascript:;">'+
                        '<img class="mui-media-object mui-pull-left" src="'+data.data[i].goodUrl+'">'+
                        '<div class="mui-media-body">'+
                        ''+data.data[i].goodName+''+
                        '<p class="mui-ellipsis" style="position: relative;top:6px;"><span style="color: red;font-size: 17px;">￥'+data.data[i].goodPrice+'</span><span>/赚 ￥'+data.data[i].saleProfit+'</span></p>'+
                        '<button type="button" class="layui-btn layui-btn-danger layui-btn-radius" style="float: right;height: 32px;width: 96px;">分 享 赚</button>'+
                        '</div>'+
                        '</a>'+
                        '</li>'
                    )
                    }

                }
            }
        });
    })

    function goodDetails(id) {
        window.location.href="${base}/wx/good/goodDetails.html?id="+id;
    }
</script>
</html>


